{% extends 'Web/layout_main.html.twig' %}

{% block myCss %}
{% endblock %}



{% block banner %}
    {#{{ dump(banner) }}#}
    <div id="myCarousel" class="carousel slide">
        <!-- 轮播（Carousel）指标 -->
        <ol class="carousel-indicators">
            {% for index,item in banner %}
                <li data-target="#myCarousel" data-slide-to="{{ index }}" class="{{ index==0?"active":"" }}"></li>
            {% endfor %}
            {#<li data-target="#myCarousel" data-slide-to="0" class="active"></li>#}
            {#<li data-target="#myCarousel" data-slide-to="1"></li>#}
            {#<li data-target="#myCarousel" data-slide-to="2"></li>#}
        </ol>
        <!-- 轮播（Carousel）项目 -->
        <div class="carousel-inner">
            {% for index,item in banner %}
                <div class="item {{ index==0?"active":"" }}">
                    <a href="{{ item.url?item.url:"#" }}"><img src="{{ item.pic }}" alt="this is slide"></a>
                </div>
            {% endfor %}

            {#<div class="item">#}
                {#<img src="/web/img/banner.jpg" alt="Second slide">#}
            {#</div>#}
            {#<div class="item">#}
                {#<img src="/web/img/banner.jpg" alt="Third slide">#}
            {#</div>#}
        </div>
        <!-- 轮播（Carousel）导航 -->
        <a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
            <span class="sr-only">Previous</span>
        </a>
        <a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
            <span class="sr-only">Next</span>
        </a>
    </div>
{% endblock %}

{% block adBanner %}
    {#banner_ad_1#}
    {% if adBannerArray.index is defined %}
        <div class="mart20 marb20 bdso">
            <a href="{{ adBannerArray.index.url }}"><img class="w100" src="{{ adBannerArray.index.pic }}" alt="banner_ad_1"></a>
        </div>
    {% endif %}
{% endblock %}


{% block main %}
    <div>

        {#动态栏目 start#}
        <div class="container mart10">
            <div class="row fs18 c1">
                <div class="col-md-12 flrc">
                    <div class="flex1 fwb">
                        <span class="fa fa-yelp"></span>
                        <span>动态</span>
                    </div>
                    <div class="fs14">
                        <a href="{{ path("news") }}">
                            <span class="padr5">查看更多</span>
                            <span class="fa fa-angle-double-right"></span>
                        </a>
                    </div>
                </div>
            </div>
            <div class="tab_wrap row bdso bdc12 container">
                <div class="row tac lh2">
                    {% for index,item in  list_dt%}
                        <a href="{{ path("articleCatList",{id:item.id}) }}"><div data-id="{{ item.id }}" class="tab col-md-2 col-sm-3 col-xs-3 padt5 padb5 {{ index == 0?'jb00 c13':'bc13 c11' }}">{{ item.name }}</div></a>
                    {% endfor %}
                </div>
                {% for index,cat in list_dt %}
                    <div class="row container tab_content tab_content_{{ cat.id }}" {{ index==0?'':'style="display: none"' }} >
                        {{  render(path("ArtListPic",{category:cat.id,page:0,limit:24,tpl:'list_icon_date_4'})) }}
                    </div>
                {% endfor %}
            </div>
        </div>
        {#动态栏目 end#}

        {#资讯栏目 start#}
        <div class="container mart10">
            <div class="row fs18 c1">
                <div class="col-md-12 flrc">
                    <div class="flex1">
                        <span class="fa fa-rss-square"></span>
                        <span class=" fwb">资讯</span>
                    </div>
                    <div class="fs14">
                        <a href="{{ path("article") }}">
                            <span class="padr5">查看更多</span>
                            <span class="fa fa-angle-double-right"></span>
                        </a>
                    </div>
                </div>
            </div>
            <div class="tab_wrap row bdso bdc12 container">
                <div class="row tac lh2">
                    {% for index,item in  list_zx%}
                        <a href="{{ path("articleCatList",{id:item.id}) }}"><div data-id="{{ item.id }}" class="tab col-md-2 col-sm-3 col-xs-3 padt5 padb5 {{ index == 0?'jb00 c13':'bc13 c11' }}">{{ item.name }}</div></a>
                    {% endfor %}
                </div>
                {% for index,cat in list_zx %}
                    <div class="row container tab_content tab_content_{{ cat.id }}" {{ index==0?'':'style="display: none"' }} >
                        {{  render(path("ArtListPic",{category:cat.id,page:0,limit:3,tpl:'index_pic_intro'})) }}
                    </div>
                {% endfor %}
            </div>
        </div>
        {#资讯栏目 end#}

        {#资料栏目 start#}
        <div class="container mart10">
            <div class="row fs18 c1">
                <div class="col-md-12 flrc">
                    <div class="flex1">
                        <span class="fa fa-folder-open"></span>
                        <span class=" fwb">资料</span>
                    </div>
                    <div class="fs14">
                        <a href="{{ path("files") }}">
                            <span class="padr5">查看更多</span>
                            <span class="fa fa-angle-double-right"></span>
                        </a>
                    </div>
                </div>
            </div>
            <div class="tab_wrap row bdso bdc12 container">
                <div class="row tac lh2">
                    {% for index,item in  list_zl%}
                        <a href="{{ path("articleCatList",{id:item.id}) }}"><div data-id="{{ item.id }}" class="tab col-md-2 col-sm-3 col-xs-3 padt5 padb5 {{ index == 0?'jb00 c13':'bc13 c11' }}">{{ item.name }}</div></a>
                    {% endfor %}
                </div>
                {% for index,cat in list_zl %}
                    <div class="row container tab_content tab_content_{{ cat.id }}" {{ index==0?'':'style="display: none"' }} >
                        {{  render(path("ArtListPic",{category:cat.id,page:0,limit:18,tpl:'list_icon_date_6'})) }}
                    </div>
                {% endfor %}
            </div>
        </div>
        {#资料栏目 end#}
    </div>

{% endblock %}

{% block myJs %}
{% endblock %}
